import request from '@/utils/request'

// 生活区信息
export function getLiving(data) {
  return request({
    url: '/living/getPage',
    method: 'post',
    data: data
  })
}
// 删除信息
export function deleteLiving(id) {
  return request({
    url: `/living/delete/${id}`,
    method: 'get',
    headers: {
      'Content-Type':'application/x-www-form-urlencoded'
    }
  })
}
// 添加生活区
export function addLiving(data) {
  return request({
    url: '/living/save',
    method: 'post',
    data: data
  })
}
//更新生活区
export function updateLiving(data) {
  return request({
    url: '/living/update',
    method: 'post',
    data: data
  })
}
// 添加楼栋
export function addbuild(data) {
  return request({
    url: '/building/save',
    method: 'post',
    data: data
  })
}